	package com.rm2pt.generator.springboot.LabManage.entity;
	
	import org.hibernate.annotations.Fetch;
	import org.hibernate.annotations.FetchMode;
	import com.fasterxml.jackson.annotation.JsonBackReference;
	import com.fasterxml.jackson.annotation.JsonIgnore;
	import javax.persistence.FetchType;
	import java.util.ArrayList;
	import javax.persistence.OneToMany;
	import javax.persistence.OneToOne;
	import javax.persistence.CascadeType;
	import java.util.Date;
	import java.util.List;
	import java.io.Serializable;
	import javax.persistence.Entity;
	import javax.persistence.Transient;
	import javax.persistence.GeneratedValue;
	import javax.persistence.GenerationType;
	import javax.persistence.Id;
	import javax.persistence.JoinColumn;
	import javax.persistence.ManyToOne;
	import com.fasterxml.jackson.annotation.ObjectIdGenerators;
	import com.fasterxml.jackson.annotation.JsonIdentityInfo;
	
	@Entity
	public class Plan extends BaseEntity {
		
		/* all primary attributes */
		private String content;
		public String getContent() {
			return content;
		}
		public void setContent(String Content) {
			this.content = Content;
		}	
			
		private String belongGroup;
		public String getBelongGroup() {
			return belongGroup;
		}
		public void setBelongGroup(String BelongGroup) {
			this.belongGroup = BelongGroup;
		}	
			
		private String belongUser;
		public String getBelongUser() {
			return belongUser;
		}
		public void setBelongUser(String BelongUser) {
			this.belongUser = BelongUser;
		}	
			
		private String id;
		public String getId() {
			return id;
		}
		public void setId(String Id) {
			this.id = Id;
		}	
			
		private Boolean finish;
		public Boolean getFinish() {
			return finish;
		}
		public void setFinish(Boolean Finish) {
			this.finish = Finish;
		}	
			

		
		@ManyToOne(targetEntity=Student.class)
		@JoinColumn(name="planbelongstudent_realid",referencedColumnName="realid")
		private Student planBelongStudent;
				
		public Student getPlanBelongStudent() {
			return planBelongStudent;
		}
				
		public void setPlanBelongStudent(Student PlanBelongStudent) {
			this.planBelongStudent = PlanBelongStudent;
		}
		
		@ManyToOne(targetEntity=Teacher.class)
		@JoinColumn(name="plantoteacher_realid",referencedColumnName="realid")
		private Teacher plantoTeacher;
				
		public Teacher getPlantoTeacher() {
			return plantoTeacher;
		}
				
		public void setPlantoTeacher(Teacher PlantoTeacher) {
			this.plantoTeacher = PlantoTeacher;
		}
		
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Plan other = (Plan) obj;
			if (!this.getRealid().equals(other.getRealid()))
				return false;
			else
				return true;
		}
	}
